package com.lnsf.bookstore.system.orderDetail.controller;

import com.lnsf.bookstore.system.orderDetail.service.OrderDetailService;
import com.lnsf.bookstore.system.orderDetail.vo.OrderDetail;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("/orderdetail")
public class OrderDetailController {

    @Autowired
    private OrderDetailService orderDetailService;

    /**
     * 订单详情列表,提供订单选择
     */
    @RequestMapping("/select/{oid}")
    /*@RequiresPermissions("sys:role:select")*/
    @ResponseBody
    public Object select(@PathVariable("oid")Integer oid) {
        Map<String, Object> map = new HashMap<>();
        List<OrderDetail> list = orderDetailService.selectByOid(oid);
        map.put("list",list);
        return map;
    }
	
	
	
}
